from pydantic import BaseModel


class TestReportIn(BaseModel):
    project_name: str = ''
    test_count: int = 0
    pass_count: int = 0
    failed_count: int = 0
    pass_rate: str = ''
    come_from: str = ''
    execute_nickName: str = ''
    corn_id: int = 0
    total_test_spending_time: float = 0
    test_domain: str = ''
    test_detail: dict = {}
    project_id: int = 0


class TestReportCreate(TestReportIn):
    pass


class TestReportUpdate(TestReportIn):
    pass


class TestReportOut(TestReportIn):
    id: int

    class Config:
        orm_mode = True
